home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freelog 125
/
Freelog_MarsAvril2015_No125.iso
/
Musique
/
Quod Libet
/
quodlibet-3.3.0-installer.exe
/
bin
/
quodlibet
/
player
/
xinebe
/
cdefs.pyc
(
.txt
)
< prev
next >
Wrap
Python Compiled Bytecode
|
2014-12-31
|
7KB
|
229 lines
# Source Generated with Decompyle++
# File: in.pyc (Python 2.7)
import sys
import ctypes
from quodlibet.util import load_library
try:
(_libxine, name) = load_library([
'libxine.so.2',
'libxine.so.1'])
except OSError:
e = None
raise ImportError(e)
if name.endswith('2'):
_version = 2
else:
_version = 1
class xine_event_t(ctypes.Structure):
if _version == 1:
_fields_ = [
('type', ctypes.c_int),
('stream', ctypes.c_void_p),
('data', ctypes.c_void_p),
('data_length', ctypes.c_int)]
elif _version == 2:
_fields_ = [
('stream', ctypes.c_void_p),
('data', ctypes.c_void_p),
('data_length', ctypes.c_int),
('type', ctypes.c_int)]
class xine_ui_message_data_t(ctypes.Structure):
_fields_ = [
('compatibility_num_buttons', ctypes.c_int),
('compatibility_str_len', ctypes.c_int),
('compatibility_str', 256 * ctypes.c_char),
('type', ctypes.c_int),
('explanation', ctypes.c_int),
('num_parameters', ctypes.c_int),
('parameters', ctypes.c_void_p),
('messages', ctypes.c_char)]
xine_event_listener_cb_t = ctypes.CFUNCTYPE(ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(xine_event_t))
XINE_EVENT_UI_PLAYBACK_FINISHED = 1
XINE_EVENT_UI_CHANNELS_CHANGED = 2
XINE_EVENT_UI_SET_TITLE = 3
XINE_EVENT_UI_MESSAGE = 4
XINE_EVENT_FRAME_FORMAT_CHANGE = 5
XINE_EVENT_AUDIO_LEVEL = 6
XINE_EVENT_QUIT = 7
XINE_EVENT_PROGRESS = 8
XINE_PARAM_SPEED = 1
XINE_PARAM_AV_OFFSET = 2
XINE_PARAM_AUDIO_CHANNEL_LOGICAL = 3
XINE_PARAM_SPU_CHANNEL = 4
XINE_PARAM_VIDEO_CHANNEL = 5
XINE_PARAM_AUDIO_VOLUME = 6
XINE_PARAM_AUDIO_MUTE = 7
XINE_PARAM_AUDIO_COMPR_LEVEL = 8
XINE_PARAM_AUDIO_AMP_LEVEL = 9
XINE_PARAM_AUDIO_REPORT_LEVEL = 10
XINE_PARAM_VERBOSITY = 11
XINE_PARAM_SPU_OFFSET = 12
XINE_PARAM_IGNORE_VIDEO = 13
XINE_PARAM_IGNORE_AUDIO = 14
XINE_PARAM_IGNORE_SPU = 15
XINE_PARAM_BROADCASTER_PORT = 16
XINE_PARAM_METRONOM_PREBUFFER = 17
XINE_PARAM_EQ_30HZ = 18
XINE_PARAM_EQ_60HZ = 19
XINE_PARAM_EQ_125HZ = 20
XINE_PARAM_EQ_250HZ = 21
XINE_PARAM_EQ_500HZ = 22
XINE_PARAM_EQ_1000HZ = 23
XINE_PARAM_EQ_2000HZ = 24
XINE_PARAM_EQ_4000HZ = 25
XINE_PARAM_EQ_8000HZ = 26
XINE_PARAM_EQ_16000HZ = 27
XINE_PARAM_AUDIO_CLOSE_DEVICE = 28
XINE_PARAM_AUDIO_AMP_MUTE = 29
XINE_PARAM_FINE_SPEED = 30
XINE_PARAM_EARLY_FINISHED_EVENT = 31
XINE_PARAM_GAPLESS_SWITCH = 32
XINE_PARAM_DELAY_FINISHED_EVENT = 33
XINE_SPEED_PAUSE = 0
XINE_SPEED_SLOW_4 = 1
XINE_SPEED_SLOW_2 = 2
XINE_SPEED_NORMAL = 4
XINE_SPEED_FAST_2 = 8
XINE_SPEED_FAST_4 = 16
XINE_META_INFO_TITLE = 0
XINE_META_INFO_COMMENT = 1
XINE_META_INFO_ARTIST = 2
XINE_META_INFO_GENRE = 3
XINE_META_INFO_ALBUM = 4
XINE_META_INFO_YEAR = 5
XINE_META_INFO_VIDEOCODEC = 6
XINE_META_INFO_AUDIOCODEC = 7
XINE_META_INFO_SYSTEMLAYER = 8
XINE_META_INFO_INPUT_PLUGIN = 9
XINE_STATUS_IDLE = 0
XINE_STATUS_STOP = 1
XINE_STATUS_PLAY = 2
XINE_STATUS_QUIT = 3
XINE_MSG_NO_ERROR = 0
XINE_MSG_GENERAL_WARNING = 1
XINE_MSG_UNKNOWN_HOST = 2
XINE_MSG_UNKNOWN_DEVICE = 3
XINE_MSG_NETWORK_UNREACHABLE = 4
XINE_MSG_CONNECTION_REFUSED = 5
XINE_MSG_FILE_NOT_FOUND = 6
XINE_MSG_READ_ERROR = 7
XINE_MSG_LIBRARY_LOAD_ERROR = 8
XINE_MSG_ENCRYPTED_SOURCE = 9
XINE_MSG_SECURITY = 10
XINE_MSG_AUDIO_OUT_UNAVAILABLE = 11
XINE_MSG_PERMISSION_ERROR = 12
XINE_MSG_FILE_EMPTY = 13
XINE_MSG_AUTHENTICATION_NEEDED = 14
_libxine.xine_new.restype = ctypes.c_void_p
_libxine.xine_init.argtypes = [
ctypes.c_void_p]
_libxine.xine_exit.argtypes = [
ctypes.c_void_p]
_libxine.xine_config_load.argtypes = [
ctypes.c_void_p,
ctypes.c_char_p]
_libxine.xine_get_homedir.restype = ctypes.c_char_p
_libxine.xine_open_audio_driver.argtypes = [
ctypes.c_void_p,
ctypes.c_char_p,
ctypes.c_void_p]
_libxine.xine_open_audio_driver.restype = ctypes.c_void_p
_libxine.xine_close_audio_driver.argtypes = [
ctypes.c_void_p,
ctypes.c_void_p]
_libxine.xine_stream_new.argtypes = [
ctypes.c_void_p,
ctypes.c_void_p,
ctypes.c_void_p]
_libxine.xine_stream_new.restype = ctypes.c_void_p
_libxine.xine_close.argtypes = [
ctypes.c_void_p]
_libxine.xine_open.argtypes = [
ctypes.c_void_p,
ctypes.c_char_p]
_libxine.xine_open.restype = ctypes.c_int
_libxine.xine_play.argtypes = [
ctypes.c_void_p,
ctypes.c_int,
ctypes.c_int]
_libxine.xine_play.restype = ctypes.c_int
_libxine.xine_stop.argtypes = [
ctypes.c_void_p]
_libxine.xine_dispose.argtypes = [
ctypes.c_void_p]
_libxine.xine_event_new_queue.argtypes = [
ctypes.c_void_p]
_libxine.xine_event_new_queue.restype = ctypes.c_void_p
_libxine.xine_event_dispose_queue.argtypes = [
ctypes.c_void_p]
_libxine.xine_event_create_listener_thread.argtypes = [
ctypes.c_void_p,
ctypes.c_void_p,
ctypes.c_void_p]
_libxine.xine_usec_sleep.argtypes = [
ctypes.c_int]
_libxine.xine_set_param.argtypes = [
ctypes.c_void_p,
ctypes.c_int,
ctypes.c_int]
_libxine.xine_get_param.argtypes = [
ctypes.c_void_p,
ctypes.c_int]
_libxine.xine_get_param.restype = ctypes.c_int
_libxine.xine_get_meta_info.argtypes = [
ctypes.c_void_p,
ctypes.c_int]
_libxine.xine_get_meta_info.restype = ctypes.c_char_p
_libxine.xine_get_status.argtypes = [
ctypes.c_void_p]
_libxine.xine_get_status.restype = ctypes.c_int
_libxine.xine_get_pos_length.argtypes = [
ctypes.c_void_p,
ctypes.POINTER(ctypes.c_int),
ctypes.POINTER(ctypes.c_int),
ctypes.POINTER(ctypes.c_int)]
_libxine.xine_get_version_string.restype = ctypes.c_char_p
_libxine.xine_get_file_extensions.argtypes = [
ctypes.c_void_p]
_libxine.xine_get_file_extensions.restype = ctypes.c_char_p
_libxine.xine_get_mime_types.argtypes = [
ctypes.c_void_p]
_libxine.xine_get_mime_types.restype = ctypes.c_char_p
_libxine.xine_list_input_plugins.argtypes = [
ctypes.c_void_p]
_libxine.xine_list_input_plugins.restype = ctypes.POINTER(ctypes.c_char_p)
_libxine.xine_check_version.argtypes = [
ctypes.c_int,
ctypes.c_int,
ctypes.c_int]
_libxine.xine_check_version.restype = ctypes.c_int
module = sys.modules[__name__]
for name in dir(_libxine):
if name.startswith('xine_'):
setattr(module, name, getattr(_libxine, name))
continue
_callbacks = []
def xine_event_create_listener_thread(queue, callback, user_data):
cb = xine_event_listener_cb_t(callback)
_callbacks.append(cb)
_libxine.xine_event_create_listener_thread(queue, cb, user_data)
def xine_get_pos_length(stream):
_pos_stream = ctypes.c_int()
_pos_time = ctypes.c_int()
_length_time = ctypes.c_int()
result = _libxine.xine_get_pos_length(stream, ctypes.byref(_pos_stream), ctypes.byref(_pos_time), ctypes.byref(_length_time))
if result:
return (_pos_stream.value, _pos_time.value, _length_time.value)
return None